<?php
ini_set('include_path', '../');
include_once '../../../../mainfile.php';
echo"<div style='margin:8px;'>";
	require_once '../Calendar/Week.php';;
	$week = new Calendar_Week(date('Y',$_SESSION['beginWeek']), date('m',$_SESSION['beginWeek']), date('d',$_SESSION['beginWeek']));
	
	$week->build();
		echo "\n<table cellpadding='0' cellspacing='0' style='border:0; padding:0;'>\n
		\n<th class='blockTitle' style='width:14%;'>Mon</th><th class='blockTitle' style='width:14%;'>Tue</th><th class='blockTitle' style='width:14%;'>Wed</th><th class='blockTitle' style='width:14%;'>Thu</th><th class='blockTitle' style='width:14%;'>Fri</th><th class='blockTitle' style='width:14%;'>Sat</th><th class='blockTitle' style='width:14%;'>Sun</th>\n\n";
	        echo "<tr>\n";	
	
		while ($Day = $week->fetch()) {

	
	    if ($Day->isEmpty()) {
	        echo "<td style='padding-left:1px;vertical-align:top; height: 265px;'>&nbsp;</td>\n";
	    } else {
	        echo "<td ";
	        if($Day->thisDay()== date("j") && mktime(0,0,0,date("m"),date("j"),date("Y")) >= $_SESSION['beginWeek'] && mktime(0,0,0,date("m"),date("j"),date("Y")) <= $_SESSION['endWeek']){echo"class='dayHighLight'";}
	        echo "style='padding-left:1px;vertical-align:top; height:265px;border:1px solid #999999;'>";
			echo"".$Day->thisDay()."<br /></td>\n";
	    }
	
//if(date("m",$_SESSION['timestamp']).$Day->thisDay().date("Y",$_SESSION['timestamp']) == date("mdY",mktime(0,0,0,date("m"),date("d"),date("Y")))){echo"class='dayHighLight'";}
	    //$_SESSION['beginWeek']  mktime(0,0,0,date("m"),date("d"),date("Y")) >= $_SESSION['beginWeek'] && mktime(0,0,0,date("m"),date("d"),date("Y")) <= $_SESSION['endWeek']
	}//date("m").$Day->thisDay().date("Y") == date("m").date("d").date("Y")
	echo "</tr>\n";	
	echo "</table>\n";
?>
</div>